//
//  TestProblem169.swift
//  LeetCodeTests
//
//  Created by 武侠 on 2023/6/12.
//  Copyright © 2023 zhulongiMac02. All rights reserved.
//

import XCTest
@testable import LeetCode

class TestProblem169: XCTestCase {
    
    var problem = Problem169()
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    // MARK: - 排序
    func testProblem169_Case1() throws {
        let nums = [3,2,3]
        assert(problem.majorityElement(nums) == 3)
    }
    
    func testProblem169_Case2() throws {
        let nums = [2,2,1,1,1,2,2]
        assert(problem.majorityElement(nums) == 2)
    }

}
